package com.bangf.repo;

import com.bangf.domain.FpTownSum;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TownSumRepo extends JpaRepository<FpTownSum,Integer> {

    @Query(value =  "SELECT * FROM fp_town_sum " +
                    "ORDER BY all_income DESC " +
                    "limit ?1",nativeQuery = true)
    List<FpTownSum> findOrderByAllIncome(Integer rank);
}
